package com.yuanian.wf.annotation.scan;

import com.yuanian.wf.annotation.ProcessKey;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.classreading.MetadataReader;
import java.io.IOException;

/**
 * WfProcessKey注解的扫描器
 */
public class ProcessClassPathScanningCandidateComponentProvider extends ClassPathScanningCandidateComponentProvider {

    @Override
    protected boolean isCandidateComponent(MetadataReader metadataReader) throws IOException {
        return metadataReader.getAnnotationMetadata().hasAnnotation(ProcessKey.class.getName());
    }

}
